package cn.new7as.cas5s.ui.repay;


import android.os.Bundle;

import android.view.KeyEvent;

import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.just.agentweb.AgentWeb;

import cn.new7as.cas5s.ui.slideshow.BaseActivity;
import cn.new7as.cas5s.R;
import cn.new7as.cas5s.databinding.ActivityPayForthBinding;


public class PayForthActivity extends BaseActivity {


    ActivityPayForthBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityPayForthBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        setop("");
        ViewGroup decorView = (ViewGroup) getWindow().getDecorView();
        View viewById = decorView.findViewById(android.R.id.content);
        viewById
                .setBackgroundResource(R.color.tran);


        String url = getIntent().getStringExtra("data");


        agentWeb = AgentWeb.with(this)
                .setAgentWebParent(binding.linepayfour, new LinearLayout.LayoutParams(-1, -1))
                .useDefaultIndicator()
                .createAgentWeb()
                .ready()
                .go(url);


    }

    AgentWeb agentWeb;

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {

        if (keyCode == KeyEvent.KEYCODE_BACK) {
            if (agentWeb.handleKeyEvent(keyCode, event)) {
                return true;
            } else finish();
            return true;
        }

        return super.onKeyDown(keyCode, event);
    }


}